<template>
    <div class="heAndWi">
        <div class="row-md q-pa-lg absolute-center">
            <q-avatar size="100px" >
                <img src="https://cdn.quasar.dev/img/avatar.png">
            </q-avatar>
            <div class="row-md  text-center">
                    <span class=" text-h6 text-cut  text-white text-weight-medium text-cut">{{userInfo.nick}}
                        <!--                <q-popup-edit v-model="loginUser.nick" content-class="bg-white text-green" @save="saveNickName">-->
                        <!--                    <q-input clearable color="green" v-model="loginUser.nick"-->
                        <!--                             :rules="[-->
                        <!--                                              val => !!val || '不能为空*',-->
                        <!--                                              val => val.length < 8 || '最多不能超过8个字',-->
                        <!--                                            ]"-->
                        <!--                             dense autofocus counter>-->
                        <!--                        <template v-slot:append>-->
                        <!--                            <q-icon  name="edit"/>-->
                        <!--                        </template>-->
                        <!--                    </q-input>-->
                        <!--                </q-popup-edit>-->
                    </span>
                <!--            <q-icon style="color:white" name="edit"/>-->
               <div>
                   <span class="text-white text-caption q-pa-sm-sm">今天 12:38 登录</span>
               </div>
            </div>
        </div>
    </div>
</template>

<script>
  import MsgUtil from "../../../utils/msgUtils";

  export default {
    name: "ProfileInfoUser",
    props:{
      userInfo:Object
    },
    data(){
      return {
        loginUser:{
          nick:"J-IM 朋友圈",
        }
      }
    },
    methods:{
      saveNickName (newVal, oldVal) {
        if (newVal && newVal.length < 8) {
          MsgUtil.sendSuccess("修改昵称成功")
        }else{
          this.loginUser.nick = oldVal
        }
      }
    }
  }
</script>

<style scoped>

</style>
